﻿			function myShareAll(){
				document.getElementById("myDesignTable").style.display="none";
				document.getElementById("myOrderTable").style.display="none";
				 $(".shoppingCar_subtitle").hide();
				 $("#friend_content_right").html("");
				 $("#friend_content_right").append("<div id='reportdialog'></div>");
				 $("#friend_content_right").append("<div id='register-form' style='z-index:10;'></div>");
				 $("#friend_content_right").append("<div id='report_success' style='z-index:999;'></div>");
				// $("#friend_content_right").append("<div id='register-form'></div>");
				 $("#friend_content_right").append("<div class='myfriend_friendactivity_content_right_childtitle'></div>");
				 $(".myfriend_friendactivity_content_right_childtitle").append("<div class='myfriend_friendactivity_content_right_childtitle_left'></div>");
				 $(".myfriend_friendactivity_content_right_childtitle_left").append("<div style='width:153px; height:23px; float:left; padding-top:3px; text-align:left;'><a href='javascript:void(0);' onclick='showMyshare()'>个人分享</a>(<span id='myShare_count'></span>条)</div>");
				 $(".myfriend_friendactivity_content_right_childtitle").append("<div class='myfriend_friendactivity_content_right_childtitle_right'></div>");
				 $(".myfriend_friendactivity_content_right_childtitle_right").append("<div style='width:153px; height:23px; padding-top:3px;'><a href='javascript:void(0);' onclick='showmyparticipation()'>参与分享</a>(<span id='partinshare_count'></span>个)</div>");
				 $("#friend_content_right").append("<div id='all_share_content_myshare_out'></div>");
				 $("#all_share_content_myshare_out").append("<div id='all_share_content_myshare'></div><div class='holder4'></div>"); 
				 //$("#all_share_content_myshare_out").append("<div id='all_share_content_myshare'></div><div class='holder'></div>"); 
				 $("#friend_content_right").append("<div id='all_share_content_myparticipation_out'></div>");
				 $("#all_share_content_myparticipation_out").append("<div id='all_share_content_myparticipation'></div><div class='holder'></div>");
				 /*------------------------myshare-------------------------*/
				 
				 $.getJSON('MyOwnShareAndPareInShareAction?time='+Math.random(10),function(data){
				 	$("#myShare_count").html(data.sharecustomnopay.length+data.mycustomsShare.length);
				 	 if(data.sharecustomnopay.length>0){
						 $.each(data.sharecustomnopay,function(index1,value1){
							var commentcount=0;
							 var date=newData(value1.customTime);
							 $("#all_share_content_myshare").append("<div id='"+value1.customId+"each_share_content_myshare_nopay' class='share_content_left_child'></div>");
							 $("#"+value1.customId+"each_share_content_myshare_nopay").append("<div id='"+value1.customId+"each_share_content_myshare_left_nopay' class='share_content_left_child_img' ><img src='"+value1.customPic+"' class='productionimg' style='border-radius:10px 10px 10px 10px;'/></div>");
							 $("#"+value1.customId+"each_share_content_myshare_nopay").append("<div id='"+value1.customId+"each_share_content_myshare_right_nopay' class='share_content_left_child_text' style='height: 230px;'></div>");
							 $("#"+value1.customId+"each_share_content_myshare_right_nopay").append("<span style='float:left;'>【"+value1.userName+"】"+value1.customContent+"</span><span style='float:right'>"+date+"</span><br/><br/>");
							 $("#"+value1.customId+"each_share_content_myshare_right_nopay").append("<div id='"+value1.customId+"commentContent_nopay'></div>");
							 var t=0;
							 $.each(data.nopaycansharecustomcomments,function(index2,value2){
								 	if(value2.customId==value1.customId){
								 		commentcount++;
								 		if(t==0){
									 		$("#"+value1.customId+"commentContent_nopay").html("");
									 		$("#"+value1.customId+"commentContent_nopay").append("<span style='float:left;'><a href='getFriendOwnMessageAction?uname="+value2.userName+"'>"+value2.userName+"</a>:"+value2.commentContent+newData(value2.commentTime)+"</span>");
								 			$("#"+value1.customId+"commentContent_nopay").append("<span style='float: right'><a style='font-size:11px;' href='javascript:void(0);' onclick='openreportdialogs(\""+value2.userName+"\","+value2.commentId+")'>投诉他</a>|<a style='font-size:11px;' href='javascript:void(0);' onclick='openprivatedialogs(\""+value2.userName+"\")'>私聊</a></span><br/><br/>");
								 			t++;
								 		}
								 	}
							 });
							 //$("#"+value1.customId+"each_share_content_myshare_right_nopay").append("<span style='float:left;'><a style='font-size:11px;' href='javascript:void(0);' onclick='ShowMoreComment("+value1.customId+",1)'>显示更多评论</a>(<span id='"+value1.customId+"mysharecomemntcount_nopay'>"+777+"</span>)</span><br/>");
							 $("#"+value1.customId+"each_share_content_myshare_right_nopay").append("<span style='float:left;'>显示更多评论(<span id='"+value1.customId+"mysharecomemntcount_nopay'>"+commentcount+"</span>)</span><br/>");
							 $("#"+value1.customId+"each_share_content_myshare_right_nopay").append("<span style='float:left;'><input type='text' name='textContent' id='"+value1.customId+"textContent_nopay' size='40'></span><br/>");
							 $("#"+value1.customId+"each_share_content_myshare_right_nopay").append("<span style='float:left;'><button type='button'  onclick='CustomUploadFiledialog("+value1.customId+",\""+value1.userName+"\",1)'>发送图片或文件</button></span>"); 	
							 $("#"+value1.customId+"each_share_content_myshare_right_nopay").append("<span style='float:left;'><button type='button'  onclick='sendComment("+value1.customId+",1)' >发表</button></span>");
						 });
					 }
				 	 if(data.mycustomsShare.length>0){
						 $.each(data.mycustomsShare,function(index1,value1){
							 var date=newData(value1.orderTime);
							 var commentsharecount=0;
							 $("#all_share_content_myshare").append("<div id='"+value1.orderId+"each_share_content_myshare' class='share_content_left_child'></div>");
							 $("#"+value1.orderId+"each_share_content_myshare").append("<div id='"+value1.orderId+"each_share_content_myshare_left' class='share_content_left_child_img' ><img src='"+value1.orderPic+"' class='productionimg' style='border-radius:10px 10px 10px 10px;'/></div>");
							 $("#"+value1.orderId+"each_share_content_myshare").append("<div id='"+value1.orderId+"each_share_content_myshare_right' class='share_content_left_child_text' style='height: 230px;'></div>");
							 $("#"+value1.orderId+"each_share_content_myshare_right").append("<span style='float:left;'>【"+value1.userName+"】"+value1.orderContent+"</span><span style='float:right'>"+date+"</span><br/><br/>");
							 $("#"+value1.orderId+"each_share_content_myshare_right").append("<div id='"+value1.orderId+"commentContent'></div>");
							 var t=0;
							 $.each(data.custIsShareComments,function(index2,value2){
								 	if(value2.customId==value1.orderId){
								 		commentsharecount++;
								 		if(t==0){
								 			$("#"+value1.orderId+"commentContent").html("");
									 		$("#"+value1.orderId+"commentContent").append("<span style='float:left;'><a href='getFriendOwnMessageAction?uname="+value2.userName+"'>"+value2.userName+"</a>:"+value2.commentContent+newData(value2.commentTime)+"</span>");
								 			$("#"+value1.orderId+"commentContent").append("<span style='float: right'><a style='font-size:11px;' href='javascript:void(0);' onclick='openreportdialogs(\""+value2.userName+"\","+value2.commentId+")'>投诉他</a>|<a style='font-size:11px;' href='javascript:void(0);' onclick='openprivatedialogs(\""+value2.userName+"\")'>私聊</a></span><br/><br/>");
								 			t++;
								 		}
								 	}
							 });
							 //$("#"+value1.customId+"each_share_content_myshare_right_nopay").append("<span style='float:left;'><a style='font-size:11px;' href='javascript:void(0);' onclick='ShowMoreComment("+value1.customId+",1)'>显示更多评论</a>(<span id='"+value1.customId+"mysharecomemntcount_nopay'>"+777+"</span>)</span><br/>");
							 $("#"+value1.orderId+"each_share_content_myshare_right").append("<span style='float:left;'>显示更多评论(<span id='"+value1.orderId+"mysharecomemntcount'>"+commentsharecount+"</span>)</span><br/>");
							 $("#"+value1.orderId+"each_share_content_myshare_right").append("<span style='float:left;'><input type='text' name='textContent' id='"+value1.orderId+"textContent' size='40'></span><br/>");
							 $("#"+value1.orderId+"each_share_content_myshare_right").append("<span style='float:left;'><button type='button'  onclick='CustomUploadFiledialog("+value1.orderId+",\""+value1.userName+"\",0)'>发送图片或文件</button></span>"); 	
							 $("#"+value1.orderId+"each_share_content_myshare_right").append("<span style='float:left;'><button type='button'  onclick='sendComment("+value1.orderId+",0)' >发表</button></span>");
						 });
					 }
				 	DoMyShareJpages();
				 /* ------------------------partinshare-------------------------*/
				 	$("#partinshare_count").html(data.myPartIncustomsShare.length+data.partinsharenopay.length);
					if(data.myPartIncustomsShare.length>0){
						 $.each(data.myPartIncustomsShare,function(index1,value1){
							 var count=0;
							 var date=newData(value1.orderTime);
							 $("#all_share_content_myparticipation").append("<div id='"+value1.orderId+"each_share_content_myparticipation' class='share_content_left_child' style='border-radius:10px 10px 10px 10px;'></div>&nbsp;");
							 $("#"+value1.orderId+"each_share_content_myparticipation").append("<div id='"+value1.orderId+"each_share_content_myparticipation_left' class='share_content_left_child_img' style='border-radius:10px 10px 10px 10px;'><img class='productionimg' src='"+value1.orderPic+"' style='border-radius:10px 10px 10px 10px;'/></div>");
							 $("#"+value1.orderId+"each_share_content_myparticipation").append("<div id='"+value1.orderId+"each_share_content_myparticipation_right' class='share_content_left_child_text' style='height: 230px; border-radius:10px 10px 10px 10px;'></div>");
							 $("#"+value1.orderId+"each_share_content_myparticipation_right").append("<span style='float:left;'>【"+value1.userName+"】"+value1.orderContent+"</span><span style='float:right'>"+date+"</span><br/><br/>");
							 $("#"+value1.orderId+"each_share_content_myparticipation_right").append("<div id='"+value1.orderId+"commentContentmyparticipation'></div>");
							var t=0;
							 $.each(data.custPartInShareComments,function(index2,value2){
								 if(value1.orderId==value2.customId){
									 count++;
									 if(t==0){
										 $("#"+value1.orderId+"commentContentmyparticipation").html("<span style='float:left;'><a href='getFriendOwnMessageAction?uname="+value2.userName+"'>"+value2.userName+"</a>:"+value2.commentContent+newData(value2.commentTime)+"</span>");
										 $("#"+value1.orderId+"commentContentmyparticipation").append("<span style='float:right;'><a style='font-size:11px;' href='javascript:void(0);' onclick='openreportdialogs(\""+value2.userName+"\",\""+value2.commentId+"\")'>投诉他</a>|<a style='font-size:11px;' href='javascript:void(0);' onclick='openprivatedialogs(\""+value2.userName+"\")'>私聊</a></span><br/><br/>");
										 t++;
									 }
								}
							 });
							 $("#"+value1.orderId+"each_share_content_myparticipation_right").append("<span style='float:left; id='"+value1.customId+"othercommentmyparticipation'>显示更多评论(<span id='"+value1.orderId+"partinsharecomemntcount'>"+count+"</span>)</span><br/>");
							 $("#"+value1.orderId+"each_share_content_myparticipation_right").append("<span style='float:left;'><input type='text' name='textContent' id='"+value1.orderId+"textContentmyparticipation' size='40'></span><br/><br/>");
							 $("#"+value1.orderId+"each_share_content_myparticipation_right").append("<span style='float:left;'><button type='button' onclick='CustomUploadFiledialog("+value1.orderId+",\""+value1.userName+"\",0)'>上传图片或文件</button></span>");		                                                                                                                                                                         
							 $("#"+value1.orderId+"each_share_content_myparticipation_right").append("<span style='float:left;'><button type='button' onclick='sendPartInShareComment(\""+value1.orderId+"\",0)' >发送</button></span>");
						 });
					}
					if(data.partinsharenopay.length>0){
						 $.each(data.partinsharenopay,function(index1,value1){
							 var comcount=0;
							 var date=newData(value1.customTime);
							 $("#all_share_content_myparticipation").append("<div id='"+value1.customId+"each_share_content_myparticipation_nopay' class='share_content_left_child' style='border-radius:10px 10px 10px 10px;'></div>&nbsp;");
							 $("#"+value1.customId+"each_share_content_myparticipation_nopay").append("<div id='"+value1.customId+"each_share_content_myparticipation_left_nopay' class='share_content_left_child_img' style='border-radius:10px 10px 10px 10px;'><img class='productionimg' src='"+value1.customPic+"' style='border-radius:10px 10px 10px 10px;'/></div>");
							 $("#"+value1.customId+"each_share_content_myparticipation_nopay").append("<div id='"+value1.customId+"each_share_content_myparticipation_right_nopay' class='share_content_left_child_text' style='height: 230px; border-radius:10px 10px 10px 10px;'></div>");
							 $("#"+value1.customId+"each_share_content_myparticipation_right_nopay").append("<span style='float:left;'>【"+value1.userName+"】"+value1.customContent+"</span><span style='float:right'>"+date+"</span><br/><br/>");
							 $("#"+value1.customId+"each_share_content_myparticipation_right_nopay").append("<div id='"+value1.customId+"commentContentmyparticipation_nopay'></div>");
							var t=0;
							 $.each(data.nopaypartinsharecomments,function(index2,value2){
								 if(value1.customId==value2.customId){
									 comcount++;
									 if(t==0){
										 $("#"+value1.customId+"commentContentmyparticipation_nopay").html("<span style='float:left;'><a href='getFriendOwnMessageAction?uname="+value2.userName+"'>"+value2.userName+"</a>:"+value2.commentContent+newData(value2.commentTime)+"</span>");
										 $("#"+value1.customId+"commentContentmyparticipation_nopay").append("<span style='float:right;'><a style='font-size:11px;' href='javascript:void(0);' onclick='openreportdialogs(\""+value2.userName+"\",\""+value2.commentId+"\")'>投诉他</a>|<a style='font-size:11px;' href='javascript:void(0);' onclick='openprivatedialogs(\""+value2.userName+"\")'>私聊</a></span><br/><br/>");
										 t++;
									 }
								}
							 });
							 $("#"+value1.customId+"each_share_content_myparticipation_right_nopay").append("<span style='float:left; id='"+value1.customId+"othercommentmyparticipation'>显示更多评论(<span id='"+value1.customId+"partinsharecomemntcount_nopay'>"+comcount+"</span>)</span><br/>");
							 $("#"+value1.customId+"each_share_content_myparticipation_right_nopay").append("<span style='float:left;'><input type='text' name='textContent' id='"+value1.customId+"textContentmyparticipationnopay' size='40'></span><br/><br/>");
							 $("#"+value1.customId+"each_share_content_myparticipation_right_nopay").append("<span style='float:left;'><button type='button' onclick='CustomUploadFiledialog("+value1.customId+",\""+value1.userName+"\",1)'>上传图片或文件</button></span>");		                                                                                                                                                                         
							 $("#"+value1.customId+"each_share_content_myparticipation_right_nopay").append("<span style='float:left;'><button type='button' onclick='sendPartInShareComment(\""+value1.customId+"\",1)' >发送</button></span>");
						 });
					}
					DoPartInShareJpages();
					 $("#all_share_content_myparticipation_out").hide();
					 toButton();
			 });
		 }
			
			
			function showmyshareothercomment(customId){
				$("#"+customId+"commentContent_all").show(500,function(){
					$("#"+customId+"commentContent_all").click(function(){
						$("#"+customId+"commentContent_all").hide();
					});
				});
			}
			 function showmyparticipation(){
				 $("#all_share_content_myshare_out").hide();
				 $("#all_share_content_myparticipation_out").show();
			 }
			 function openreportdialogs(name,commentId){
				 	$("#reportdialog").dialog({
				 		  resizable:false,
			        	  autoOpen:true,
			              module : true,
			              width:600,
			              height:300,
			              position:[getLeft(600),getTop(300)],//定位
			              title: "我要投诉他",
			              open:function(){
			            	  	$("#reportdialog").append(reportstr_sp).fadeIn();
			            	  	$("#beReportName").val(name);
			              },
			              close: function(event, ui){
			            	  	$("#reportdialog").html("");
			              },
			              buttons:{
			            	  '提交' :function(){
			            		  var Content=document.getElementById("reportContent").value;
							    	if(Content==null||Content==""){
							    		OpenTheSHowDialog("亲，您还没有输入举报的理由呢！");
							    	}else{
							    		$.post('SendReportByAjAxAction',{'beReportName':name,'commentId':commentId,'reprotContent':Content},function(data){//传入的值和返回来的值
											if(data =="true"){
												 OpenTheSHowDialog("举报成功！我们会尽快处理！");
												$("#reportdialog").dialog('close');
											}else if(data=="false"){
												alert("举报失败");
												$("#reportdialog").dialog('close');
											}
								    	});
							    	}
			            	  },
			            	  '取消':function(){
			            		  $(this).dialog('close');
			            	  }
			              },
				 		
				 	});
			 }
			 function openprivatedialogs(name){
				 $("#register-form").dialog({
					 resizable:false,
		        	  autoOpen:true,
		              module : true,
		              width:600,
		              height:450,
		              position:[getLeft(600),getTop(450)],//定位
		              title: "找他私聊下",
		              open:function(){
		            		  $("#register-form").append(privatetalkstr_sp).fadeIn();
		            		  $("#toName").val(name);
		            		  initSWFUpload3();
		              },
		              close: function(event, ui){
		            	  $("#register-form").html("");
		              },
		              buttons:{
		            	  '提交' :function(){
		            		  content= $("#messagContent").val();
		            		  if(content==null||content==""){
		            			  OpenTheSHowDialog("亲，您还没写私聊内容！");
		            		  }else{
		            			  if(upload3.getStats().files_queued !== 0){
		            				  sendswf3();
			            		  }else if(upload3.getStats().files_queued === 0){
			            				alert("file is null");
			            			  $.post('SwfSuccessToDateBase',{'toName':$("#toName").val(),'filesName':"",'messageContent':$("#messagContent").val()},function(data){
			            					if(data=="true"){
			            						OpenTheSHowDialog("您的私聊已经发到");
			            						$("#register-form").dialog("close");
			            					}else{
			            						OpenTheSHowDialog("发送失败");
			            						$("#register-form").dialog("close");
			            					}
			            				});
			            			
			            		  }
		            		  }
		            	  },
		            	  '取消':function(){
		            		  $(this).dialog('close');
		            	  }
		              },
				 });
			 }
			 function newData(d){
					var i=d.indexOf("T");
					var str=" "+d.substr(0,i)+" "+d.substr(i+1,d.length);
					return str;
					
				}
			 function ShowMoreComment(Customid){
					alert(Customid);
					window.open("ShareInfo?_id="+Customid);
				}
			 function CustomUploadFiledialog(customId,toName,sourse){
				 alert(customId+","+toName+","+sourse);
				 $("#register-form").dialog({
					 resizable:false,
		        	  //show: "slide",
		        	  autoOpen:true,
		              module : true,
		              width:600,
		              height:400,
		              position:[getLeft(600),getTop(250)],//定位
		              title: "给他单独发个文件看",
		              open:function(){
		            		  $("#register-form").html(customuploadfilestr_sp).fadeIn();
		            		  initSWFUpload4(customId,toName,sourse);
		              },
		              close: function(event, ui){
		            	  $("#register-form").html("");
		              },
		              buttons:{
		            	  '提交' :function(){
		            		  if(upload4.getStats().files_queued === 0){
		            			  OpenTheSHowDialog("无任何文件，您先选择文件");
		            		  }else{
		            			  sendswf4();
		            		  }
		            	  },
		            	  '取消':function(){
		            		  $(this).dialog('close');
		            	  }
		              },
				 });
			 }
			 function sendComment(customId,resource){
				 if(resource==1){
					 var content=$("#"+customId+"textContent_nopay").val();
					 alert(content);
					 if(content==null||content==""){
						 OpenTheSHowDialog("亲，请输入内容哦");
					 }else{
						 $.post('CommentFriendCustomsByAjAxAction?time='+Math.random(10),{'customid':customId,'textContent':content,'sourse':resource},function(data){
							 	if(data=="success"){
							 		$("#"+customId+"textContent_nopay").val("");
							 		$.getJSON('GetTheLastCommentByCustomId?time='+Math.random(),{'CustomId':customId,'sourse':resource},function(data){
							 			$("#"+customId+"commentContent_nopay").html("");
							 			$("#"+customId+"commentContent_nopay").append("<span style='float:left;'><a href='getFriendOwnMessageAction?uname="+data.comment.userName+"'>"+data.comment.userName+"</a>:"+data.comment.commentContent+newData(data.comment.commentTime)+"</span>");
							 			$("#"+customId+"commentContent_nopay").append("<span style='float: right'><a style='font-size:11px;' href='javascript:void(0);' onclick='openreportdialogs(\""+data.comment.userName+"\","+data.comment.commentId+")'>投诉他</a>|<a style='font-size:11px;' href='javascript:void(0);' onclick='openprivatedialogs(\""+data.comment.userName+"\")'>私聊</a></span><br/><br/>");
							 			$("#"+customId+"mysharecomemntcount_nopay").html(data.commentCountbycustomid);
							 		});
							 		 OpenTheSHowDialog("评论成功了！");
							 	}else{
							 		$("#"+customId+"textContent_nopay").val("");
							 		 OpenTheSHowDialog("插入失败！");
							 	}
						 });
					 }
				 }else if(resource==0){
					 alert(customId);
					 var content=$("#"+customId+"textContent").val();
					 if(content==null||content==""){
						 OpenTheSHowDialog("亲，请输入内容哦");
					 }else{
						 $.post('CommentFriendCustomsByAjAxAction?time='+Math.random(10),{'customid':customId,'textContent':content,'sourse':resource},function(data){
							 	if(data=="success"){
							 		$("#"+customId+"textContent").val("");
							 		$.getJSON('GetTheLastCommentByCustomId?time='+Math.random(),{'CustomId':customId,'sourse':resource},function(data){
							 			$("#"+customId+"commentContent").html("");
							 			$("#"+customId+"commentContent").append("<span style='float:left;'><a href='getFriendOwnMessageAction?uname="+data.comment.userName+"'>"+data.comment.userName+"</a>:"+data.comment.commentContent+newData(data.comment.commentTime)+"</span>");
							 			$("#"+customId+"commentContent").append("<span style='float: right'><a style='font-size:11px;' href='javascript:void(0);' onclick='openreportdialogs(\""+data.comment.userName+"\","+data.comment.commentId+")'>投诉他</a>|<a style='font-size:11px;' href='javascript:void(0);' onclick='openprivatedialogs(\""+data.comment.userName+"\")'>私聊</a></span><br/><br/>");
							 			$("#"+customId+"mysharecomemntcount").html(data.commentCountbycustomid);
							 		});
							 		 OpenTheSHowDialog("评论成功了！");
							 	}else{
							 		$("#"+customId+"textContent_nopay").val("");
							 		 OpenTheSHowDialog("插入失败！");
							 	}
						 });
					 }
				 }
			 }
			 function sendPartInShareComment(orderId,sourse){
				 if(sourse==0){
					alert(orderId);
					 var content=$("#"+orderId+"textContentmyparticipation").val();
					 if(content==null||content==""){
						 OpenTheSHowDialog("亲，请输入内容哦");
					 }else{
						 $.post('CommentFriendCustomsByAjAxAction?time='+Math.random(),{'customid':orderId,'textContent':content,'sourse':sourse},function(data){
							 	if(data=="success"){
							 		$("#"+orderId+"textContentmyparticipation").val("");
							 		$.getJSON('GetTheLastCommentByCustomId?time='+Math.random(),{'CustomId':orderId,'sourse':sourse},function(data){
							 			$("#"+orderId+"commentContentmyparticipation").html("");
							 			$("#"+orderId+"commentContentmyparticipation").append("<span style='float:left;'><a href='getFriendOwnMessageAction?uname="+data.comment.userName+"'>"+data.comment.userName+"</a>:"+data.comment.commentContent+ newData(data.comment.commentTime)+"</span>");
							 			$("#"+orderId+"commentContentmyparticipation").append("<span style='float: right'><a style='font-size:11px;' href='javascript:void(0);' onclick='openreportdialogs(\""+data.comment.userName+"\","+data.comment.commentId+")'>投诉他</a>|<a style='font-size:11px;' href='javascript:void(0);' onclick='openprivatedialogs(\""+data.comment.userName+"\")'>私聊</a></span><br/><br/>");
							 			$("#"+orderId+"partinsharecomemntcount").html(data.commentCountbycustomid);
							 		});
							 		 OpenTheSHowDialog("评论成功了！");
							 	}else{
							 		$("#"+orderId+"textContentmyparticipation").val("");
							 		OpenTheSHowDialog("评论失败！");
							 	}
						 });
					 }
				 }else if(sourse==1){
					 var content=$("#"+orderId+"textContentmyparticipationnopay").val();
					 if(content==null||content==""){
						 OpenTheSHowDialog("亲，请输入内容哦");
					 }else{
						 $.post('CommentFriendCustomsByAjAxAction?time='+Math.random(),{'customid':orderId,'textContent':content,'sourse':sourse},function(data){
							 	if(data=="success"){
							 		$("#"+orderId+"textContentmyparticipationnopay").val("");
							 		$.getJSON('GetTheLastCommentByCustomId?time='+Math.random(),{'CustomId':orderId,'sourse':sourse},function(data){
							 			$("#"+orderId+"commentContentmyparticipation_nopay").html("");
							 			$("#"+orderId+"commentContentmyparticipation_nopay").append("<span style='float:left;'><a href='getFriendOwnMessageAction?uname="+data.comment.userName+"'>"+data.comment.userName+"</a>:"+data.comment.commentContent+ newData(data.comment.commentTime)+"</span>");
							 			$("#"+orderId+"commentContentmyparticipation_nopay").append("<span style='float: right'><a style='font-size:11px;' href='javascript:void(0);' onclick='openreportdialogs(\""+data.comment.userName+"\","+data.comment.commentId+")'>投诉他</a>|<a style='font-size:11px;' href='javascript:void(0);' onclick='openprivatedialogs(\""+data.comment.userName+"\")'>私聊</a></span><br/><br/>");
							 			$("#"+orderId+"partinsharecomemntcount_nopay").html(data.commentCountbycustomid);
							 		});
							 		 OpenTheSHowDialog("评论成功了！");
							 	}else{
							 		$("#"+orderId+"textContentmyparticipationnopay").val("");
							 		OpenTheSHowDialog("评论失败！");
							 	}
						 });
					 }
				 }
				 
			 }
			 
			
			 function DoPartInShareJpages(){
					$("div.holder").jPages({
					    containerID :"all_share_content_myparticipation",
						first: '首页',
						last: '尾页',
						previous: '上页',
						next: '下页',
					    perPage:2,
						callback: function( pages, items ){
							items.showing.find("img").trigger("turnPage");
							items.oncoming.find("img").trigger("turnPage");
						}
					});
				}
			function DoMyShareJpages(){
					$("div.holder4").jPages({
					    containerID :"all_share_content_myshare",
						first: '首页',
						last: '尾页',
						previous: '上页',
						next: '下页',
					    perPage:2,
						callback: function( pages, items ){
							items.showing.find("img").trigger("turnPage");
							items.oncoming.find("img").trigger("turnPage");
						}
					});
				}
			 function showMyshare(){
				 $("#all_share_content_myshare_out").show();
				 $("#all_share_content_myparticipation_out").hide();
			 }
			  function initSWFUpload4(customId,toName,sourse) {
					var settings = {
						flash_url : "swfupload/swfupload.swf",
						 upload_url: "CustomUpdateFileAction",
						 post_params: {"customId":customId,"toName":toName,"sourse":sourse},
						file_size_limit : "100 MB",
						file_post_name: "files",
						file_types : "*.txt;*.gif",
						file_types_description : "txt模式和JPG",
						file_upload_limit : 100,
						file_queue_limit : 0,
						custom_settings : {
							progressTarget : "fsUploadProgress4",
							cancelButtonId : "btnCancel4"
						},
						debug: false,

						//button_image_url: "img/51.png",
						button_width: "80",
						button_height: "29",
						button_placeholder_id: "spanButtonPlaceholder4",
						button_text: '<span class="theFont">选取文件</span>',
						button_text_style: ".theFont { font-size: 16; }",
						button_text_left_padding: 12,
						button_text_top_padding: 3,
						
						// The event handler functions are defined in handlers.js
						file_dialog_start_handler : fileDialogStart_action,
						file_queued_handler : fileQueued_action,
						file_queue_error_handler : fileQueueError_action,
						file_dialog_complete_handler : fileDialogComplete_action,
						upload_start_handler : uploadStart_action,
						upload_progress_handler : uploadProgress_action,
						upload_error_handler : uploadError_action,
						upload_success_handler : uploadSuccess_action,
					    upload_complete_handler : uploadComplete_action
					};
					upload4 = new SWFUpload(settings);
			     };
			 
			 
			     function initSWFUpload3() {
						var settings = {
							flash_url : "swfupload/swfupload.swf",
							 upload_url: "PrivateTalkSWFUploadAction",
							 post_params: {"toName" :$("#toName").val()},
							file_size_limit : "100 MB",
							file_post_name: "file",
							file_types : "*.txt;*.gif",
							file_types_description : "txt模式和JPG",
							file_upload_limit : 100,
							file_queue_limit : 0,
							custom_settings : {
								progressTarget : "fsUploadProgress3",
								cancelButtonId : "btnCancel3"
							},
							debug: false,

							//button_image_url: "img/51.png",
							button_width: "80",
							button_height: "29",
							button_placeholder_id: "spanButtonPlaceholder3",
							button_text: '<span class="theFont">选取文件</span>',
							button_text_style: ".theFont { font-size: 16; }",
							button_text_left_padding: 12,
							button_text_top_padding: 3,
							
							// The event handler functions are defined in handlers.js
							file_dialog_start_handler : fileDialogStart_privateTalk,
							file_queued_handler : fileQueued_privateTalk,
							file_queue_error_handler : fileQueueError_privateTalk,
							file_dialog_complete_handler : fileDialogComplete_privateTalk,
							upload_start_handler : uploadStart_privateTalk,
							upload_progress_handler : uploadProgress_privateTalk,
							upload_error_handler : uploadError_privateTalk,
							upload_success_handler : uploadSuccess_privateTalk,
						    upload_complete_handler : uploadComplete_privateTalk,
						};
						upload3 = new SWFUpload(settings);
				     };
		var upload3;
		var upload4;
		function sendswf3(){
			upload3.startUpload();
		}
		function sendswf4(){
			upload4.startUpload();
		}
		
		function getTop(height){
			var windowheight=window.innerHeight;
			return (windowheight-height)/2;
		}
		function getLeft(width){
			var windowwidth=window.innerWidth;
			return (windowwidth-width)/2;
		}
		function toButton(){
			$("button").button();
		}
		function OpenTheSHowDialog(message){
			$("#report_success").html(message).dialog({
				autoOpen:true,
				width:300,
				height:180,
				position:[getLeft(300),getTop(180)],
				buttons:{
					确定:function(){
						$(this).dialog("close");
					}
				}
			});
		}
		
var reportstr_sp="<div id='report_div' align='center'>"+
		"<table align='center' bgcolor='#FFFAFO'>"+
			"<tr>"+
				"<td>"+
					"举报他"+
				"</td>"+
				"<td>"+
					"<input type='text' name='beReportName' id='beReportName' readonly='readonly' size='30px'/><br/>"+
				"</td>"+
			"</tr>"+
			"<tr>"+
				"<td>"+
					"举报情况:"+
				"</td>"+
				"<td>"+
					"<textarea rows='6' cols='70' name='reportContent' id='reportContent'></textarea><br/>"+
				"</td>"+
			"</tr>"+
		"</table>"+
	"</div>";
var customuploadfilestr_sp="<div id='customuploadfilestrdiv' align='center'>"+
								"<table align='center' bgcolor='#FFFAFO'>"+
									"<tr>"+
										"<td colspan='2'>"+
											"<div class='fieldset flash' id='fsUploadProgress4' style='float: center;'>"+
												"<span class='legend'>文件上传</span>"+
											"</div>"+
										"</td>"+
									"</tr>"+
									"<tr>"+
										"<td>"+
											"<span id='spanButtonPlaceholder4'></span>"+
										"</td>"+
										"<td>"+
											"<input id='btnCancel4' type='button' value='Cancel Uploads' onclick='cancelQueue(upload4)' disabled='disabled' style='margin-left: 2px; height: 22px; font-size: 8pt;' />"+
										"</td>"+
									"</tr>"+
								"</table>"+
						"</div>";
var privatetalkstr_sp="<div id='privatemessage' align='center' style='background-color:#FFFAFO;'>"+
"<table align='center'>"+
	"<tr>"+
		"<td>"+"发给:"+"</td>"+
		"<td>"+
			"<input type='text' name='toName' id='toName' readonly='readonly'/>"+
		"</td>"+
	"</tr>"+
	"<tr>"+
			"<td>"+"内容:"+"</td>"+
			"<td>"+
				"<textarea rows='6' cols='70' name='messagContent' id='messagContent'></textarea>"+
			"</td>"+
	"</tr>"+
"</table>"+
"<div align='center'>"+
	"<table>"+
		  "<tr>"+
				"<td>"+
					"<div align='right'>"+
						"<span id='spanButtonPlaceholder3'></span>"+
					"</div>"+
				"</td>"+
				"<td>"+
					"<div align='left'>"+
						"<input id='btnCancel3' type='button' value='取消上传的文件' onclick='cancelQueue(upload3)' disabled='disabled' style='margin-left: 2px; height: 22px; font-size: 8pt;' />"+
					"</div>"+
				"</td>"+
		  "</tr>"+
	      "<tr>"+
			"<td colspan='2' align='center'>"+
				"<div class='fieldset flash' id='fsUploadProgress3'>"+
					"<span class='legend'>文件上传</span>"+
				"</div>"+
			"</td>"+
      "</tr>"+
	"</table>"+
"</div>"+
"</div>";